<template>
  <div>
    <h2 class="title">{{ message }}</h2>
    <button @click="btnClick">按钮</button>
    <h2>{{ name }}</h2>
    <test2></test2>
  </div>
</template>

<script>
import test2 from "./Test2.vue";
export default {
  name: "test",
  data() {
    return {
      message: "你好你好,我是Vue",
      name: "xiaoLam",
    };
  },
  methods: {
    btnClick() {
      console.log("我被点击了");
    },
  },
  components: {
    test2,
  },
};
</script>

<style scoped>
.title {
  color: pink;
}
</style>